MyUniqueMenuID
Allocates a new menu ID. This is how you would define your menu ID allocation function if you were to name itMyUniqueMenuID
:
typedef SInt16 MyUniqueMenuID ( JMAWTContextRef context, Boolean isSubmenu);
context
- The AWT context containing the frame.
isSubMenu
- A Boolean value. If false, the menu to add is a standard menu. If true, the menu is a submenu. The menu ID value of a submenu must be in the range 1 to 255.
- function result
- If successful, the function should return the ID of the new menu. Otherwise the function returns 0.
DISCUSSION
When instantiating an AWT context, you must designate a callback function to create new menu IDs if necessary.